package com.huawei.struts.service.imp;

import java.util.List;

import com.huawei.struts.dao.LjwCatalogTDAO;
import com.huawei.struts.exception.SystemException;
import com.st.model.CatalogT;
import com.st.model.LjwCatalogT;

public class CatalogImpl implements com.huawei.struts.service.CatalogService {

	private LjwCatalogTDAO ljwCatalogTDAO;
	 

	public LjwCatalogTDAO getLjwCatalogTDAO() {
		return ljwCatalogTDAO;
	}

	public void setLjwCatalogTDAO(LjwCatalogTDAO ljwCatalogTDAO) {
		this.ljwCatalogTDAO = ljwCatalogTDAO;
	}

	public void deleteCatalog(CatalogT catalog) throws SystemException {
		// TODO Auto-generated method stub
		
	}

	public List getALlCataLog() throws SystemException {
		// TODO Auto-generated method stub
		return ljwCatalogTDAO.findAll();
	}

	public List getALlCataLogByParentId(Integer parentId)
			throws SystemException {
		// TODO Auto-generated method stub
		return ljwCatalogTDAO.showCatalogByParentId(parentId);
	}

	public LjwCatalogT getDatailCatalog(Integer id) throws SystemException {
		// TODO Auto-generated method stub
		return ljwCatalogTDAO.findById(id);
	}

	public void saveCatalog(LjwCatalogT catalog) throws SystemException {
		ljwCatalogTDAO.save(catalog);
		
	}

	public void updateCatalog(LjwCatalogT catalog) throws SystemException {
		ljwCatalogTDAO.merge(catalog);
		
	}

	public void deleteCatalog(LjwCatalogT catalog) throws SystemException {
		ljwCatalogTDAO.delete(catalog);
		
	}

	
	

	
}
